package com.example.es;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;

import java.io.IOException;

/**
 * @Author：wlz
 * @Package：com.example.es
 * @Project：redis
 * @name：ESTest_Client
 * @Date：2023/4/15 22:03
 * @Filename：ESTest_Client
 */
public class ESTest_Client {
    public static void main(String[] args) throws IOException {
        //创建
        RestHighLevelClient restHighLevelClient = new RestHighLevelClient(RestClient.builder(new HttpHost("localhost",9200)));
        //关闭
        restHighLevelClient.close();
    }
}
